<!--
 * @Author: zhangxiangsheng 1026583651@qq.com
 * @Date: 2024-06-25 14:03:16
 * @LastEditors: zhangxiangsheng 1026583651@qq.com
 * @LastEditTime: 2024-06-25 15:12:02
 * @FilePath: \appGly\pages\Station\components\srxq.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
-->
<template>
	<u-popup :show="show" mode="right" width="100%" :zoom="false">
		<view>
			<u-navbar title="收入详情" @leftClick="
          () => {
            show = !show;
          }
        " :autoBack="false"></u-navbar>
			<view class="srlistitem u-flex" v-for="(item, key) in list" :key="key">
				<view class="iconfont iconqia" v-if="item.lx == 'Card'"></view>
				<view class="iconfont iconsaoma" v-else></view>
				<view class="mui-media-body" v-if="item.lx != 'Card'">
					<view class="text1">
						{{ item.sjc }}&nbsp;{{$z.$t("费率")}}{{ $z.flfn(item.je) }}{{$z.$t("元")}}
					</view>
					<view class="text2">
						{{ item.mc }}&nbsp;&nbsp;&nbsp;{{ $z.$t("通道") }}:{{ item.td }}
					</view>
				</view>
				<view class="mui-media-body" v-if="item.lx == 'Card'">
					<view class="text1">{{ $z.$t("卡号") }}：{{ item.printid }}</view>
					<view class="text2">
						{{ item.sjc }}&nbsp;&nbsp;&nbsp;{{ type[item.type] }}
					</view>
				</view>

				<view class="je">{{ (item.je / 100).toFixed(2) }}{{$z.$t("元")}}</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				list: [],
				type: {
					0: this.$z.$t("微信支付"),
					1: this.$z.$t("支付宝支付"),
					2: this.$z.$t("余额支付"),
				},
			};
		},
		methods: {
			async init(data) {
				this.show = true;
				// "/GetRfCDFr" : "/GetRfCardFr";
				let GetRfCDFr = await this.$z.request("/GetRfCDFr", {
					pcsid: data.pcsid,
					frid: data.frid,
					sjs: data.sj + " 00:00:00",
					sje: this.$z.timefn.gettime(-1, this.$z.timefn.getdateTime(data.sj)) +
						" 00:00:00",
				});

				let GetRfCardFr = await this.$z.request("/GetRfCardFr", {
					pcsid: data.pcsid,
					frid: data.frid,
					sjs: data.sj + " 00:00:00",
					sje: this.$z.timefn.gettime(-1, this.$z.timefn.getdateTime(data.sj)) +
						" 00:00:00",
				});

				GetRfCardFr.forEach((element) => {
					element.lx = "Card";
				});
				this.list = [...GetRfCDFr, ...GetRfCardFr];
			},
		},
	};
</script>

<style lang="scss" scoped>
	.srlistitem {
		padding: 8rpx 0;
		position: relative;

		&::after {
			content: "";
			position: absolute;
			left: 30rpx;
			right: 0;
			height: 2rpx;
			background: #eee;
			bottom: 0;
		}

		.iconfont {
			color: #2093f5;
			font-size: 60rpx;
			width: 100rpx;
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.je {
			font-size: 40rpx;
			font-weight: bold;
			color: #2093f5;
			padding: 0 30rpx;
		}

		.mui-media-body {
			width: 0;
			flex: 1;

			.text1 {
				font-size: 28rpx;
				color: #333333;
				line-height: 24px;
			}

			.text2 {
				font-size: 14px;
				color: #969696;
				line-height: 18px;
			}
		}
	}
</style>